<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib prefix="MyTag" uri="/WEB-INF/tlds/checkSession.tld"%>
<%@ page language="java" import="fsmi.model.*,java.util.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>courseList</title>
</head>
<body>
	<MyTag:checkSession />
	<h2>Course</h2>
	<%!List<CourseBean> cList = null;%>
	<jsp:useBean id="courseList" scope="session"
		class="fsmi.model.CourseListBean"></jsp:useBean>
	<%
		if (courseList != null)
			cList = (List<CourseBean>) courseList.getCourseList();
	%>
	<%!Iterator<CourseBean> itor = null;%>
	<%
		if (cList != null)
			itor = cList.iterator();
	%>
	<%!String appPath = null;%>
	<%
		appPath = application.getContextPath();
	%>
	<%
		if (itor != null)
			while (itor.hasNext()) {
	%>
	<%
		CourseBean c = itor.next();
	%>
	<form action="<%=appPath%>/Homework/<%=c.getCid()%>" method="get">
		<table>
			<tr>
				<td>
					<p><%=c.getCname()%></p>
				</td>
				<td>
					<button type="submit">detail</button>
				</td>
			</tr>
		</table>
	</form>
	<%
		}
	%>
</body>
</html>